Crate wasmcloud_provider_sdk
source ·Re-exports§
pub use provider::get_connection;
pub use provider::load_host_data;
pub use provider::run_provider;
pub use provider::run_provider_handler;
pub use provider::start_provider;
pub use provider::ProviderConnection;
pub use crate::error::ProviderOperationResult;
pub use wasmcloud_core as core;
pub use wasmcloud_tracing;
Modules§
- Error types for interacting with a provider
Structs§
- Context - message passing metadata used by wasmhost Actors and Capability Providers
- Re-export of types from
wasmcloud_core
- Re-export of types from
wasmcloud_core
- Re-export of types from
wasmcloud_core
A link definition between a source and target component (actor or provider) on a given interface. AnInterfaceLinkDefinition
connects one component’s import to another component’s export, specifying the configuration each component needs in order to execute the request, and represents an operator’s intent to allow the source to invoke the target. - Re-export of types from
wasmcloud_core
Constants§
- The default timeout for a request to the lattice, in milliseconds
Traits§
- Configuration of a link that is passed to a provider
- The super trait containing all necessary traits for a provider
- CapabilityProvider handling of messages from host
- todo: invert this so that the provider takes the wrpc_transport::Client and then hooks up it’s own handlers Handler for dispatching invocations that come via wRPC
- A trait for providers that are powered by WIT contracts and communicate with wRPC
Functions§
- Parse an sufficiently specified WIT operation/method into constituent parts.
- Returns the rpc topic (subject) name for sending to an actor or provider. A provider entity must have the public_key and link_name fields filled in. An actor entity must have a public_key and an empty link_name.
- Generates a fully qualified wasmbus URL for use in wascap claims. The optional method parameter is used for generating URLs for targets being invoked
- helper method to add logging to a nats connection. Logs disconnection (warn level), reconnection (info level), error (error), slow consumer, and lame duck(warn) events.
Type Aliases§
- Re-export of types from
wasmcloud_core
WIT interface for a given operation (ex.readwrite
inwasi:keyvalue/readwrite.get
) - Re-export of types from
wasmcloud_core
WIT namespace for a given operation (ex.wasi
inwasi:keyvalue/readwrite.get
) - Re-export of types from
wasmcloud_core
WIT package for a given operation (ex.keyvalue
inwasi:keyvalue/readwrite.get
) - Human readable name of a [
wit_parser::WorldKey
] which includes interface ID if necessary see: https://docs.rs/wit-parser/latest/wit_parser/struct.Resolve.html#method.name_world_key - A NATS subject which is used for wRPC, normally of the shape
<lattice>.<target id>.wrpc.0.0.1.<interface>.<operation>